﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;

namespace StdDocTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //from XmlDocument.
            XmlDocument dox = new XmlDocument();
            dox.Load("0001.xml");
            List<DataSet> dss = StdDoc.Convert.ToDataSet(dox);
            DataSet ds = dss[0];

            //from string.
            XmlDocument dox2 = new XmlDocument();
            dox2.Load("0001.xml");
            string a = dox2.OuterXml;
            List<DataSet> dss2 = StdDoc.Convert.ToDataSet(dox2.InnerXml);
            DataSet ds2 = dss[0];

            //from file path.
            List<DataSet> dss1 = StdDoc.Convert.ToDataSetFromFile("0001.xml");
            DataSet ds1 = dss1[0];

        }
    }
}
